package com.dang.apj.serviceImp;

import java.util.List;

import com.dang.apj.factory.DaoFactory;
import com.dang.apj.model.Book;
import com.dang.apj.model.Product;
import com.dang.apj.service.ProductService;

public class ProductServiceImpl implements ProductService {

	@Override
	public Book findById(int id) throws Exception {
		return DaoFactory.getProductImpl().findById(id);
	}

	@Override
	public List<Product> findByHot(int num) throws Exception {
		return DaoFactory.getProductImpl().findByHot(num);
	}

	@Override
	public List<Product> findByNew(int num) throws Exception {
		return DaoFactory.getProductImpl().findByNew(num);
	}

}
